//
//  AliyunOSSManager.h
//  GSBlockChain
//
//  Created by guoshikeji_a on 2018/11/30.
//  Copyright © 2018 guoshikeji. All rights reserved.
//

#import <Foundation/Foundation.h>

#import <AliyunOSSiOS.h>

#import "AliyunOSSPutObject.h"
#import "AliyunOSSPutResponseObject.h"

//相关类
@class AliyunOSSConfigurationData;

//error 为oss 内部上传错误 错误原因太多不一一列举  统一可处理成上传失败
typedef void(^OSSPutObjectCompleteBlock)(AliyunOSSPutResponseObject *respObj,NSError *error);

NS_ASSUME_NONNULL_BEGIN
/**
 上传和下载aliyunOSS的管理器
 */
@interface AliyunOSSManager : NSObject

/**
 实例
 */
+ (instancetype)sharedOSS;

/**
 *AliyunOSSConfigurationData 获取的上传的OSS配置信息
 */
@property (nonatomic, weak, readonly) AliyunOSSConfigurationData *ossCofigurationData;


#pragma mark - put
/**
 上传文件 all
 */
- (OSSTask *)putObject:(AliyunOSSPutObject *)object
           putProgress:(OSSNetworkingUploadProgressBlock)progress
            retryBlock:(OSSNetworkingRetryBlock)retryBlock
              complete:(OSSPutObjectCompleteBlock)complete;
/**
 上传文件 prgress
 */
- (OSSTask *)putObject:(AliyunOSSPutObject *)object
           putProgress:(OSSNetworkingUploadProgressBlock)progress
              complete:(OSSPutObjectCompleteBlock)complete;
/**
 上传文件
 */
- (OSSTask *)putObject:(AliyunOSSPutObject *)object
              complete:(OSSPutObjectCompleteBlock)complete;

//
- (void)putObjects:(NSArray <AliyunOSSPutObject *> *)objects;


#pragma mark - get
/**
 下载oss服务器上的文件
 */


@end

NS_ASSUME_NONNULL_END
